#pragma once

#include <memory>
#include "Math/Matrix4x4.h"
#include "Containers/Vector.h"

class CRenderMesh;
class CPreRenderPixelObjectGroup;
class CRenderPixelObjectMap;
struct SPreRenderContext;

class CRenderPixelObjectInstance
{
public:
    SMatrix4x4 ModelMatrix;
    uint16_t ObjectID;

    std::shared_ptr<CRenderMesh> Mesh;
};

//渲染像素对象实例组
class CRenderPixelObjectInstanceGroup
{
public:
    TVector<std::shared_ptr<CRenderPixelObjectInstance>> Instances;

    TVector<std::shared_ptr<CRenderPixelObjectInstance>> ForegroundInstances;

    std::shared_ptr<CRenderPixelObjectMap> PixelObjectMap;
    uint32_t MapWidth;
    uint32_t MapHeight;

    void GeneratePreRenderData(
        SPreRenderContext& InPreRenderContext
        ,std::shared_ptr<CPreRenderPixelObjectGroup> OutData) const;
};